import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SEntityId } from "./SEntityId";
type int = number;
//class SPublicMiniPlayer
// did
export class SPublicMiniPlayer extends IMessageBase {
  constructor(arg1: Boolean = false) {
    super();
    if (arg1) {
      MessageManager.instance().regist(this);
    }
    return;
  }

  public /* override */ getType(): int {
    return this._type;
  }

  public /* override */ clone(): IMessageBase {
    return new SPublicMiniPlayer();
  }

  public /* override */ __write(arg1: SerializeStream): void {
    this.entityId.__write(arg1);
    arg1.writeString(this.name);
    arg1.writeByte(this.sex);
    arg1.writeByte(this.camp);
    arg1.writeShort(this.career);
    arg1.writeShort(this.careerEnable);
    arg1.writeByte(this.level);
    arg1.writeByte(this.VIP);
    arg1.writeInt(this.copyId);
    arg1.writeByte(this.captain);
    arg1.writeByte(this.online);
    arg1.writeByte(this.reserveByte2);
    arg1.writeInt(this.num);
    arg1.writeInt(this.gateChannelId);
    arg1.writeInt(this.warfare);
    arg1.writeInt(this.copyCode);
    arg1.writeInt(this.mapId);
    arg1.writeByte(this.avatarId);
    arg1.writeByte(this.photo);
    return;
  }

  public /* override */ __read(arg1: SerializeStream): void {
    this.entityId = new SEntityId();
    this.entityId.__read(arg1);
    this.name = arg1.readString();
    this.sex = arg1.readByte();
    this.camp = arg1.readByte();
    this.career = arg1.readShort();
    this.careerEnable = arg1.readShort();
    this.level = arg1.readByte();
    this.VIP = arg1.readByte();
    this.copyId = arg1.readInt();
    this.captain = arg1.readByte();
    this.online = arg1.readByte();
    this.reserveByte2 = arg1.readByte();
    this.num = arg1.readInt();
    this.gateChannelId = arg1.readInt();
    this.warfare = arg1.readInt();
    this.copyCode = arg1.readInt();
    this.mapId = arg1.readInt();
    this.avatarId = arg1.readByte();
    this.photo = arg1.readByte();
    return;
  }

  public /* const */ _type: int = 8;

  public /* var */ entityId!: SEntityId;

  public /* var */ name!: string;

  public /* var */ sex!: int;

  public /* var */ camp!: int;

  public /* var */ career!: int;

  public /* var */ careerEnable!: int;

  public /* var */ level!: int;

  public /* var */ VIP!: int;

  public /* var */ copyId!: int;

  public /* var */ captain!: int;

  public /* var */ online!: int;

  public /* var */ reserveByte2!: int;

  public /* var */ num!: int;

  public /* var */ gateChannelId!: int;

  public /* var */ warfare!: int;

  public /* var */ copyCode!: int;

  public /* var */ mapId!: int;

  public /* var */ avatarId!: int;

  public /* var */ photo!: int;

  public static /* var */ _regist: SPublicMiniPlayer = new SPublicMiniPlayer(
    true
  );
}
